var GameData = require('.././module/GameData')();
cc.Class({
    extends: cc.Component,

    properties: {
        EditBox: cc.EditBox,
        exp:cc.Node,
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad() {
        this._name = "";
        this.EditBox.string = this._name;
        // GameData.gameStart.change_EXP(0.1);
    },

    start() {

    },
    onEditDidBegan: function (editbox, customEventData) {
        this.EditBox.string = "";
    },

    onEditDidEnded: function (editbox, customEventData) {

    },
    onTextChanged: function (text, editbox, customEventData) {
        this._name = editbox.string;
    },

    onEditingReturn: function (editbox, customEventData) {
        this._name = editbox.string;
    },
    /*改变玩家的经验*/
    change_EXP(num){
        // this.exp.getComponent(cc.ProgressBar).progress=num;

    },
    // update (dt) {},
});
